import pandas as pd

file_name = "题目.xlsx"

df = pd.read_excel(file_name, header=None, sheet_name='Sheet1', usecols='A,B')
print(df)
# # 遍历每一行

title_size = 5

topic_list = []
answer_list = []
for index, row in df.iterrows():
    if index % title_size == 0:
        topic_list.append(row[0])
    answer_list.append(row[1])

print(len(topic_list))
print(len(answer_list))
data = {}
for index in range(len(topic_list)):
    data[index] = [topic_list[index], answer_list[index * title_size:index * title_size + title_size]]

topic_data = data

# for index in topic_data:
#     topic = topic_data[index][0]
#     aswer_list = topic_data[index][1]
#
#     print(topic)
#     print(aswer_list)
